I am writing program in delphi (a pascal language) which will call c/c++ modules in Windows environment. I want to know how to write DLL in C/C++.
What is needed in the source code in c/c++? (I am using BC45 and I know there is something called DEF file but I don't know how to use it)
For example,
int sum(int x,int y)
{
return(x+y);
}
is a function in c/c++ code which will be placed in DLL. What is the declaration and definition in order to make it into DLL and be called by other program.